#include<stdio.h>
#include"client_connect.h"
#include"core_conf.h"

extern struct core_conf *Core_conf;

void init_client_connect(struct client_connect *CC)
{
	CC->packet_count=0;
	CC->flow_count=0;
	int i=0;
	CC->real_node_num=Core_conf->Node_conf.node_num;

		
	for(i=0;i<CC->real_node_num;i++)
	{
		CC->head[i].Node=(struct sockaddr_in *)malloc(sizeof(struct sockaddr_in));

		bzero(CC->head[i].Node,sizeof(*CC->head[i].Node));

		CC->head[i].Node->sin_family = AF_INET;
	        CC->head[i].Node->sin_port = htons(Core_conf->Node_conf.Node[i].port);
        	CC->head[i].Node->sin_addr = Core_conf->Node_conf.Node[i].ip;
	}
}
